VERSION 5.00
Begin VB.UserControl PatientTestResultForm 
   ClientHeight    =   2535
   ClientLeft      =   0
   ClientTop       =   0
   ClientWidth     =   2250
   ScaleHeight     =   2535
   ScaleWidth      =   2250
   Begin VB.PictureBox Logo 
      BackColor       =   &H00FFFFFF&
      Height          =   615
      Left            =   240
      Picture         =   "PatientTestResultForm.ctx":0000
      ScaleHeight     =   555
      ScaleWidth      =   1755
      TabIndex        =   2
      Top             =   1680
      Width           =   1815
   End
   Begin VCT.BarCode39Ctrl BarCode39Ctrl 
      Height          =   495
      Left            =   240
      TabIndex        =   0
      Top             =   960
      Width           =   1695
      _ExtentX        =   2990
      _ExtentY        =   873
   End
   Begin VB.Label Label1 
      Caption         =   "PatientTestResultSheet"
      Height          =   495
      Left            =   240
      TabIndex        =   1
      Top             =   120
      Width           =   1815
   End
End
Attribute VB_Name = "PatientTestResultForm"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = True
Attribute VB_PredeclaredId = False
Attribute VB_Exposed = False
Private BarCodeString As String
Private LocCentreCode As String
Private LocClientCode As String
Private LocSex As String
Private LocAge As String
Private LocPartnerCode As String
Private LocCoupleCode As String
Private LocCurrentRes As String
Private LocCounselorCode As String
Private LocTest1Type As String
Private LocTest2Type As String
Private LocTest3Type As String
Private LocTest1Result As String
Private LocTest2Result As String
Private LocTest3Result As String
'Private LocLabTech As String
Private LocTestDate As String

Public Sub PrintForm()

   Dim NewPtr As Printer

   For Each NewPtr In Printers
      If NewPtr.DeviceName = "LASER" Then
          Set Printer = NewPtr
       End If
   Next NewPtr

   Printer.FontName = "Arial Narrow"
   Printer.PaperSize = vbPRPSA4   'Set printer for A4 paper
   Printer.FontBold = False
   Printer.FontItalic = False
   Printer.FontUnderline = False
   Printer.Orientation = 1
   Printer.FontSize = 20
   
   BarCode39Ctrl.PrintBarCode
   
   Printer.CurrentX = 2900
   Printer.CurrentY = 3000
   Printer.Print "ANONYMOUS HIV ANTIBODY TEST"
   
   Printer.FontSize = 14
   Printer.CurrentX = 1500
   Printer.CurrentY = 4000
   Printer.Print "CENTRE CODE:"
   Printer.CurrentX = 3400
   Printer.CurrentY = 4000
   Printer.Print LocCentreCode
   
   
   Printer.CurrentX = 5000
   Printer.CurrentY = 4000
   Printer.Print "CLIENT CODE:"
   Printer.CurrentX = 6800
   Printer.CurrentY = 4000
   Printer.Print LocClientCode
   
   
   Printer.CurrentX = 1500
   Printer.CurrentY = 4500
   Printer.Print "SEX:"
   Printer.CurrentX = 2200
   Printer.CurrentY = 4500
   Printer.Print LocSex
   
   
   Printer.CurrentX = 5000
   Printer.CurrentY = 4500
   Printer.Print "AGE:"
   Printer.CurrentX = 5700
   Printer.CurrentY = 4500
   Printer.Print LocAge
   
   Printer.CurrentX = 1500
   Printer.CurrentY = 5000
   Printer.Print "PARTNER CODE:"
   Printer.CurrentX = 3600
   Printer.CurrentY = 5000
   Printer.Print LocPartnerCode
   
   Printer.CurrentX = 5000
   Printer.CurrentY = 5000
   Printer.Print "COUPLE CODE:"
   Printer.CurrentX = 7000
   Printer.CurrentY = 5000
   Printer.Print LocCoupleCode
   
   Printer.CurrentX = 1500
   Printer.CurrentY = 5500
   Printer.Print "CURRENT RESIDENCE:"
   Printer.CurrentX = 4400
   Printer.CurrentY = 5500
   Printer.Print LocCurrentRes
   
   Printer.CurrentX = 1500
   Printer.CurrentY = 6000
   Printer.Print "CONSENT FOR RAPID TEST:   YES"
   
   Printer.CurrentX = 1500
   Printer.CurrentY = 6500
   Printer.Print "COUNSELLOR'S CODE:"
   Printer.CurrentX = 4400
   Printer.CurrentY = 6500
   Printer.Print LocCounselorCode
   
   Printer.CurrentX = 1500
   Printer.CurrentY = 8000
   Printer.Print "HIV TEST RESULTS:"
   
   Printer.CurrentX = 1800
   Printer.CurrentY = 8500
   Printer.Print "TEST #1:"
   Printer.CurrentX = 3000
   Printer.CurrentY = 8500
   Printer.Print LocTest1Type & " - " & LocTest1Result
   
   Printer.CurrentX = 1800
   Printer.CurrentY = 9000
   Printer.Print "TEST #2:"
   Printer.CurrentX = 3000
   Printer.CurrentY = 9000
   Printer.Print LocTest2Type & " - " & LocTest2Result
   
   Printer.CurrentX = 1800
   Printer.CurrentY = 9500
   Printer.Print "TEST #3:"
   Printer.CurrentX = 3000
   Printer.CurrentY = 9500
   Printer.Print LocTest3Type & " - " & LocTest3Result
   
   Printer.CurrentX = 1800
   Printer.CurrentY = 10000
   Printer.Print "DATE OF TEST:"
   
   Printer.CurrentX = 3700
   Printer.CurrentY = 10000
   Printer.Print LocTestDate
   
   Printer.CurrentX = 1800
   Printer.CurrentY = 10500
   Printer.Print "TECHNICIAN'S CODE:"
   Printer.CurrentX = 4400
   Printer.CurrentY = 10500
   Printer.Print LocCounselorCode
   
   Printer.CurrentX = 1500
   Printer.CurrentY = 11500
   Printer.Print "OFFICIAL SITE STAMP:"
   
   Printer.PaintPicture Logo.Picture, 1400, 1800, 8000, 800
   
   ReturnVal = PrintRect(600, 1300, 10000, 14200)
   Printer.EndDoc
End Sub

Property Let BarCode(ByVal BarCodePar As String)
   BarCodeString = BarCodePar
   BarCode39Ctrl.BarString = BarCodeString
   BarCode39Ctrl.BarHeight = 600
   BarCode39Ctrl.StartX = 600
   BarCode39Ctrl.StartY = 600
End Property

Property Let CentreCode(ByVal CentreCodePar As String)
   LocCentreCode = CentreCodePar
End Property

Property Let ClientCode(ByVal ClientCodePar As String)
   LocClientCode = ClientCodePar
End Property

Property Let Sex(ByVal SexPar As String)
   LocSex = SexPar
End Property

Property Let Age(ByVal AgePar As String)
   LocAge = AgePar
End Property

Property Let PartnerCode(ByVal PartnerCodePar As String)
   LocPartnerCode = PartnerCodePar
End Property

Property Let CoupleCode(ByVal CoupleCodePar As String)
   LocCoupleCode = CoupleCodePar
End Property

Property Let CurrentRes(ByVal CurrentResPar As String)
   LocCurrentRes = CurrentResPar
End Property

Property Let CounselorCode(ByVal CounselorCodePar As String)
   LocCounselorCode = CounselorCodePar
End Property

Property Let Test1Type(ByVal Test1TypePar As String)
   LocTest1Type = Test1TypePar
End Property

Property Let Test1Result(ByVal Test1ResultPar As String)
   LocTest1Result = Test1ResultPar
End Property

Property Let Test2Type(ByVal Test2TypePar As String)
   LocTest2Type = Test2TypePar
End Property

Property Let Test2Result(ByVal Test2ResultPar As String)
   LocTest2Result = Test2ResultPar
End Property

Property Let Test3Type(ByVal Test3TypePar As String)
   LocTest3Type = Test3TypePar
End Property

Property Let Test3Result(ByVal Test3ResultPar As String)
   LocTest3Result = Test3ResultPar
End Property

Property Let TestDate(ByVal TestDatePar As String)
   LocTestDate = TestDatePar
End Property

